﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SB.Xml;
namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            dynamic customers = new XmlSlurper().ParseXmlFile("test.xml");
            foreach (var c in customers.customer)
            {
                Console.WriteLine("==============================================================================");
                Console.WriteLine("Customer ID {0} First Name {1} Last Name {2} " , c.id,c.firstName,c.lastName);
                Console.WriteLine("Customer Addresses..");
                foreach (var a in c.addresses.address)
                {
                    Console.WriteLine("{0} {1} {2} {3} {4} ", a.line1, a.line2, a.city,a.state,a.postalcode);
                }

            }
            Console.Read();
        }
    }
}
